<template>
	<div>
		<el-form ref="form" :model="form" label-width="80px">
		<el-form-item label="留言内容">
		    <el-input v-model="form.content"></el-input>
		</el-form-item>
		<el-form-item label="是否可用">
			<el-switch v-model="form.status" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
		</el-form-item>
		<el-form-item class="submit-btn">
		    <el-button type="primary" @click="onSubmit">立即{{type}}</el-button>
		    <el-button @click="cancel">取消</el-button>
		</el-form-item>
		</el-form>
	</div>
</template>

<script>
	import {FormFunc} from 'common/formMixin'

	export default {
		mixins: [FormFunc],
		props: {
		  form: {
		  	type: Object,
		  	default: () => {
		  		return {
		  			content: '',
		  			status: true
		  		}
		  	}
		  }
		},
		data() {
			return {
				url: 'message'
			}
		}
	}
</script>

<style scope>
.submit-btn {
	margin: 0;
	text-align: center;
}
</style>